
#ifndef __SYSTASK_H
#define	__SYSTASK_H

#include <stdint.h>


#ifdef	__cplusplus
extern "C" {
#endif
	
#ifdef   _SYSTASK_MODULE_
#define  MY_EXT
#else
#define  MY_EXT  extern
#endif  

typedef struct
{
    uint32_t st;
} sys_info_type;

typedef struct 
{
    volatile uint32_t u_tick;
    volatile uint32_t powerup_time_cnt;
    volatile uint32_t clks_at_event_rcv;
        
    volatile uint8_t b_coremark;
    
	volatile struct 
	{
		volatile uint8_t sem_req;
		volatile uint32_t sem_send_tick;
		volatile uint32_t sem_rcv_tick;
		volatile uint32_t sem_tick_amount;
		
		volatile uint8_t event_req;
		volatile uint32_t event_send_tick;
		uint32_t event_rcv_tick;
		uint32_t event_tick_amount;
		uint32_t event_dat;
		
		volatile uint8_t quene_req;
		volatile uint32_t quene_send_tick;
		volatile uint32_t quene_rcv_tick;
		volatile uint32_t quene_tick_amount;
		uint32_t quene_dat[4];
			
		volatile uint8_t mutex_req;
		uint32_t mutex_req_tick;
		uint32_t mutex_put_tick;
		uint32_t mutex_get_tick;
		uint32_t mutex_get_tick_amount;
		uint32_t mutex_put_tick_amount;
		volatile uint8_t b_mutex_busy;
		
		
	} api_tick;
	
} sys_run_st_type;

MY_EXT sys_run_st_type sys_st;

#undef MY_EXT

#ifdef	__cplusplus
}
#endif

#endif	/* __SYSTASK_H */
